﻿using System;
using System.Web.UI;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace SpImageCacheSolution.ControlTemplates.SpImageCacheSolution
{
    public partial class SpImageCacheFieldEditorControl : UserControl, IFieldEditor
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        /// <summary>
        /// Initializes the field property editor when the page loads.
        /// </summary>
        /// <param name="field">An object that instantiates a custom field (column) class that derives from the <see cref="T:Microsoft.SharePoint.SPField"/> class. </param>
        public void InitializeWithField(SPField field)
        {
            
        }

        /// <summary>
        /// Validates and saves the changes the user has made in the field property editor control. 
        /// </summary>
        /// <param name="field">The field (column) whose properties are being saved.</param><param name="isNewField">true to indicate that the field is being created; false to indicate that an existing field is being modified.</param>
        public void OnSaveChange(SPField field, bool isNewField)
        {
            
        }

        /// <summary>
        /// Gets a value that indicates whether the field property editor should be in a special section on the page. 
        /// </summary>
        /// <returns>
        /// true if the editor should be in its own section; otherwise, false. 
        /// </returns>
        public bool DisplayAsNewSection
        {
            get { return true; }
        }
    }
}
